package com.ly.designpatten.prototype;

/**
 * @Classname Prototype
 * @Description TODO
 * @Date 2020/10/8 10:19
 * @Author 冷心影翼
 */
public class Prototype {


	public static void main(String[] args) {
		Sheep sheep = new Sheep("A",1,"b",new Sheep("B",1,"r",null));
		Sheep clone1 = (Sheep) sheep.clone();
		Sheep clone2= (Sheep) sheep.clone();
		System.out.println(clone1 == clone2);
		System.out.println(clone1.getFriend() == clone2.getFriend());
	}
}
